/**
 * 
 */
package com.mycompany.client.pages.dataset;

import com.mycompany.client.i18n.Context;
import com.mycompany.shared.EnvConstants;
import com.smartgwt.client.data.DataSource;
import com.smartgwt.client.data.fields.DataSourceDateField;
import com.smartgwt.client.data.fields.DataSourceDateTimeField;
import com.smartgwt.client.data.fields.DataSourceTextField;


/**
 * @author coral.ma
 *
 */
public class AddSalesActivityPageDS extends AbstractCommonDS {

	private static DataSource addSalesActivityPageDS = null; 
	
	public static DataSource getAddSalesActivityPageDS() {
		if (addSalesActivityPageDS == null) {  
			addSalesActivityPageDS = new DataSource();  
			DataSourceTextField categoryField = new DataSourceTextField("activityCategory",Context.i18N().activityCategory(),EnvConstants.CORAL_ITEM_WIDTH, false);
			DataSourceTextField agentCodeField = new DataSourceTextField("agentCode",Context.i18N().agentCode(),EnvConstants.CORAL_ITEM_WIDTH,false);
			DataSourceTextField quotationNoField = new DataSourceTextField("quotationNo",Context.i18N().quotationNo(),EnvConstants.CORAL_ITEM_WIDTH,false);
			DataSourceTextField statusField = new DataSourceTextField("status",Context.i18N().status(),EnvConstants.CORAL_ITEM_WIDTH,false);
			DataSourceTextField customerCodeField = new DataSourceTextField("customerCode",Context.i18N().customerCode(),EnvConstants.CORAL_ITEM_WIDTH,false);
			
			DataSourceTextField customerNameField = new DataSourceTextField("customerName","CustomerName",EnvConstants.CORAL_ITEM_WIDTH,false);
			DataSourceDateField plannedDateField = new DataSourceDateField("plannedDate","Planned Date",EnvConstants.CORAL_ITEM_WIDTH,false);
			DataSourceDateTimeField plannedTimeField = new DataSourceDateTimeField("plannedTime","Planned Time",EnvConstants.CORAL_ITEM_WIDTH,false);
			DataSourceDateField actualDateField = new DataSourceDateField("actualDate","Actual Date",EnvConstants.CORAL_ITEM_WIDTH,false);
			DataSourceDateTimeField actualTimeField = new DataSourceDateTimeField("actualTime","Actual Time",EnvConstants.CORAL_ITEM_WIDTH,false);
			
			addSalesActivityPageDS.setFields(categoryField, agentCodeField, quotationNoField, statusField, customerCodeField,customerNameField, plannedDateField, plannedTimeField, actualDateField, actualTimeField);
			
        }  
		return addSalesActivityPageDS;
	}
}
